pids=`ps -ef | grep "msger" | grep -v grep | awk '{print $2}'`

if [ "$pids" = "" ]
  then
    export LANG=zh_CN
    export LC_ALL=zh_CN
    MSGER_HOME=/home/afa/msger
    PATH_SEPARATOR=:
    
    CP=$(ls $MSGER_HOME/lib/*.jar | \
                paste -s -d"$PATH_SEPARATOR" - )
    cd $MSGER_HOME
    java -cp $CP:classes cn.com.agree.msger.Msger&
  else
    echo "Msger is already start,pid is:$pids"
fi